package com.example.demo.controller;

import com.example.demo.entity.MinorityEntity;
import com.example.demo.service.MinorityService;
import com.example.demo.tool.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "所有少数民族接口")
public class MinorityController {
    @Autowired
    private MinorityService minorityService;

    @GetMapping("getAllminority")
    @ApiOperation("获取所有少数民族数据")
    public ResponseResult minoritylist(){
        List<MinorityEntity>data = minorityService.list();
        return ResponseResult.success(data);
    }
}
